﻿<%@ Page Title="Content Detail" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Steve.UI.Administration.Models.ExistingContentDetailModel>" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<% using (Html.BeginForm())
   { %>   
   <div class="toolbar">
   <button type="submit">Save</button>
   </div>

   <%: Html.ValidationSummary(string.Empty, new { @class="ui-widget ui-state-error ui-corner-all" })%>
   
   <%: Html.EditorFor(m => m.NextRevisionComment) %>

       <div class="accordion">
        <h2><a>Basic Details</a></h2>
        <div>
	   <fieldset>
       <%: Html.LabelEditorFor(m => m.Path) %>
       <%: Html.LabelEditorFor(m => m.Title) %>
       <%: Html.LabelEditorFor(m => m.Categories) %>
       <%: Html.LabelEditorFor(m => m.SiteUrlId, true) %>
       <%: Html.LabelEditorFor(m => m.Teaser, true) %>
	   </fieldset>
       </div>
       <h2><a>Data</a></h2>
       <div><%: Html.Action("ContentDataEdit", "ContentManagement", new { contentId = Model.Id } )%></div>
       <h2><a>Audit</a></h2>
       <div>
        <fieldset>
        <%: Html.LabelEditorFor(m => m.RevisionComment) %>
        <%: Html.LabelEditorFor(m => m.RevisionDate) %>
        <%: Html.LabelEditorFor(m => m.RevisionMembershipId) %>
        <%: Html.LabelEditorFor(m => m.RevisionNumber) %>
        <%: Html.LabelEditorFor(m => m.ApprovalDate) %>
        <%: Html.LabelEditorFor(m => m.ApprovalMembershipId) %>
        </fieldset>
       </div>
       <h2><a>Similar Content</a></h2>
       <div>
       <ul>
        <% foreach (var r in Model.SimilarContent)
           { %>
           <li><%: Html.ActionLink(r.Item1.Title, "ContentDetail", "ContentManagement", new { id = r.Item1.Id }, null)%> (<%: r.Item2.ToString("g") %>)</li>
        <% } %>
        </ul>
       </div>

       </div>

       <%: Html.HiddenFor(m => m.ContentTypeName) %>
<% } %>
</asp:Content>

<asp:Content ContentPlaceHolderID="ScriptContent" runat="server">
<script src="/scripts/content-detail.js"></script>
</asp:Content>